package temple.timer;

/**
 * @author 滕贝
 * @Title: ${file_name}
 * @Package ${package_name}
 * @Description: ${todo}
 * @date 2018/7/1310:56
 */

import java.util.Timer;
import java.util.TimerTask;

public  class MyTimerTask extends TimerTask {
    int count = 10;
    @Override
    public void run() {
        count = (count+1)%2;
        System.out.println("bombing!"+count);
        new Timer().schedule(new TimerTask() {

            @Override
            public void run() {
                System.out.println("bombing!"+"wolf");
            }
        },2000+2000*count);
    }
}